package com.touna.annotation.entity;

import com.touna.annotation.Idcard;
import com.touna.annotation.facet.First;
import com.touna.annotation.facet.Three;
import com.touna.annotation.facet.Two;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * author: xl
 * time: 2018/6/15 15:01
 * description:
 **/
public class Customer {

    @NotBlank
    private  String name;

    private  int age;

    @Idcard
    private  String idcard;

    @Size(min=11,max = 11,message="电话号码必须11位",groups = {Three.class})
    private  String mobile;

    @NotBlank(message = "家庭地址不能为空", groups = {First.class})
    private String homeAddr;

    @NotBlank(message = "公司地址不能为空",groups = {Two.class})
    private String companyAddr;



    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }


    public String getIdcard() {
        return idcard;
    }

    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }

    public String getHomeAddr() {
        return homeAddr;
    }

    public void setHomeAddr(String homeAddr) {
        this.homeAddr = homeAddr;
    }

    public String getCompanyAddr() {
        return companyAddr;
    }

    public void setCompanyAddr(String companyAddr) {
        this.companyAddr = companyAddr;
    }
}
